From 201aa61cb624b99aa50302c524db57eef35bf2c1 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 20 Mar 2015 20:23:07 -0700 Subject: [PATCH] Don't factor bins into fingerprint calculations The dependency is just there to get them to compile, not to actually induce recompiles. --- src/cargo/ops/cargo_rustc/fingerprint.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cargo/ops/cargo_rustc/fingerprint.rs b/src/cargo/ops/cargo_rustc/fingerprint.rs index bbf1c15e0..dca21525c 100644 --- a/src/cargo/ops/cargo_rustc/fingerprint.rs +++ b/src/cargo/ops/cargo_rustc/fingerprint.rs @@ -169,11 +169,14 @@ fn calculate<'a, 'b>(cx: &mut Context<'a, 'b>, profile)); // Next, recursively calculate the fingerprint for all of our dependencies. + // // Skip the fingerprints of build scripts as they may not always be // available and the dirtiness propagation for modification is tracked - // elsewhere + // elsewhere. Also skip fingerprints of binaries because they don't actually + // induce a recompile, they're just dependencies in the sense that they need + // to be built. let deps = try!(cx.dep_targets(pkg, target, profile).into_iter() - .filter(|&(_, t, _)| !t.is_custom_build()) + .filter(|&(_, t, _)| !t.is_custom_build() && !t.is_bin()) .map(|(pkg, target, profile)| { let kind = match kind { Kind::Host => Kind::Host, -- 2.30.2